package org.exhibition.service;

import com.fasterxml.jackson.core.JsonProcessingException;
import org.exhibition.domain.pojo.exhibition.ExhibitionList;
import org.exhibition.domain.pojo.exhibition.ExhibitionTicket;
import org.exhibition.domain.pojo.exhibition.MyExhibitionOrder;
import org.exhibition.domain.pojo.exhibition.UserTicketOrder;


import java.time.LocalDate;
import java.util.List;
import java.util.Map;

public interface ExhibitionService {
    //获取展览的list信息
    List<ExhibitionList> getAllExhibition();

    //根据id获取展览信息
    ExhibitionList getExhibitionById(Integer id);

    //根据时间获取展览
    List<Map<String,String>> getExhibitionByDate(LocalDate startDate);

    //根据名称获取展览
    List<ExhibitionTicket> getExhibitionByName(String name, LocalDate startDate);

    //根据名称获取展览详情
    ExhibitionList getExhibitionDetailByName(String name, LocalDate startDate);

    //提交展览预约
    String submitExhibitionReservation(UserTicketOrder userTicketOrder) throws JsonProcessingException;

    //进行用户点赞
    boolean likeExhibition(Integer exhibitionId);

    //判断用户是否已经点赞
    boolean isLikeExhibition(String phone, Integer exhibitionId);

    //取消用户点赞
    boolean cancelLikeExhibition(Integer exhibitionId);

    //根据名称获取展览id
    String getExhibitionIdByName(String name);

    //获取用户所有的预约
    List<MyExhibitionOrder> getAllExhibitionReservation();

    //根据订单id获取获取票的id
    Long getExhibitionTicketIdById(Integer id);

    //根据票id获取展览id
    Integer getExhibitionIdById(Integer id);
}
